<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
//			正则的贪婪和禁止贪婪
			var reg = /<div>.*<\/div>/;//找到最后一个</div>,体现了贪婪性
			var str = "<div>aaa1111</div><div>bbb2222</div>";
			var re = str.match(reg);
//			console.log(re);
//			禁止贪婪
			var reg = /<div>.*?<\/div>/g;
			var str = "<div>aaa1111</div><div>bbb2222</div>";
			var re = str.match(reg);
			console.log(re);
		</script>
	</head>
	<body>
	</body>
</html>
